x86emul: fix FMA scalar operand sizes
authorJan Beulich <jbeulich@suse.com>
Tue, 4 Sep 2018 09:28:30 +0000 (11:28 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Sep 2018 09:28:30 +0000 (11:28 +0200)
commit31c941cc2b606ed34f8743094db19ce8f0880138
tree7e3d5d6cd51b4692b4c5d73f2dbb3ad2db5e6644
parent2646b30320a09110468fc1b57c709b7d8c9b04b1
x86emul: fix FMA scalar operand sizes

FMA insns, unlike the earlier AVX additions, don't use the low opcode
bit to distinguish between single and double vector elements. While the
difference is benign for packed flavors, the scalar ones need to use
VEX.W here. Oddly enough the table entries didn't even use
simd_scalar_fp, but uniformly used simd_packed_fp (implying the
distinction was by [VEX-encoded] opcode prefix).

Split simd_scalar_fp into simd_scalar_opc and simd_scalar_vexw, and
correct FMA scalar table entries to use the latter.

Also correct the scalar insn comments (they only ever use XMM registers
as operands).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c